{% load static %}
{% for rev in educator_reviews %}
    <div class="media mb-4">
    {% if rev.is_anonymous %}
        <img class="d-flex mr-3 rounded-circle"
             src="{% static 'imgs/anonymous.png' %}" width="50" height="50"
             alt="">
        <div class="media-body">
        <h5 class="mt-0" style="margin-bottom: 2px;">Anonymous</h5>
    {% else %}
        <img class="d-flex mr-3 rounded-circle"
             src="{% static 'dashboard\img\profile-pictures.png' %}" width="50" height="50"
             alt="">
        <div class="media-body">
        <h5 class="mt-0" style="margin-bottom: 2px;"><a
                href="{% url 'dashboard:educator_student_profile' rev.student_id %}">{{ rev.student__name }}</a></h5>

    {% endif %}
<p>{{ rev.content }}</p>

<div class="btn-group btn-group-justified" id ="rep{{rev.id}}" >
    {% if rev.report__is_closed is not None %}
        {% if rev.report__is_closed %}
            <p class="p-1 mb-1 bg-danger text-white">Report Refused</p>
        {% else %}
            <p class="p-1 mb-1 bg-success text-white">Reported</p>
        {% endif %}
    {% else %}
        
        <button type="button" id ="rep{{rev.id}}" class="btn p-1 mb-1 bg-primary text-white" onclick="report({{rev.id}})">Report Abuse</button>
    {% endif %}
</div>

</div>
</div>
{% endfor %}
<ul class="pagination" style="margin-top: 25px">
    {% if educator_reviews.has_previous %}
        <li><a id="{{educator_reviews.previous_page_number}}" href="#reviews"  onclick="loadReviews(event)">Prev</a></li>
    {% else %}
        <li class="page-item disabled"><a>Prev</a></li>
    {% endif %}
    {% with ''|center:educator_reviews_num_pages as range %}
        {% for i in range %}
            <li class="page-item ">
                <a id="lis_{{ forloop.counter }}" class="page-link" href="#reviews"
                   onclick="loadReviews(event)">{{ forloop.counter }}</a>
            </li>
        {% endfor %}
    {% endwith %}
    {% if educator_reviews.has_next %}
        <li><a id="{{educator_reviews.next_page_number}}" href="#reviews"  onclick="loadReviews(event)">Next</a></li>
    {% else %}
        <li class="page-item disabled"><a>Next</a></li>
    {% endif %}

</ul>